Trigger rendering of CBI header and footer templates via the ucode runtime
`include()` in order to ensure that scope data is properly inherited from
Lua templates (`cbi/header`) including ucode templates (`header`).
This fixes automatic triggering of the config apply flow on legacy Lua CBI
forms.
Ref: https://github.com/openwrt/luci/pull/6056#issuecomment-
1292396588
Signed-off-by: Jo-Philipp Wich <[email protected]>
http:header("X-CBI-State", state or 0)
if not config.noheader then
- tpl.render("cbi/header", {state = state})
+ _G.L.include("cbi/header", {state = state})
end
local redirect
end
if not config.nofooter then
- tpl.render("cbi/footer", {
+ _G.L.include("cbi/footer", {
flow = config,
pageaction = pageaction,
redirect = redirect,